/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package co.edu.unitecnologica.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author osalcedo
 */
@Entity
@Table(name = "destinos_comprobantes")
@NamedQueries({@NamedQuery(name = "DestinosComprobantes.findAll", query = "SELECT d FROM DestinosComprobantes d"), @NamedQuery(name = "DestinosComprobantes.findByCod", query = "SELECT d FROM DestinosComprobantes d WHERE d.cod = :cod"), @NamedQuery(name = "DestinosComprobantes.findByCodPeriodo", query = "SELECT d FROM DestinosComprobantes d WHERE d.codPeriodo = :codPeriodo"), @NamedQuery(name = "DestinosComprobantes.findByDestino", query = "SELECT d FROM DestinosComprobantes d WHERE d.destino = :destino")})
public class DestinosComprobantes implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "cod")
    private Integer cod;
    @Column(name = "cod_periodo")
    private Integer codPeriodo;
    @Column(name = "destino")
    private String destino;

    public DestinosComprobantes() {
    }

    public DestinosComprobantes(Integer cod) {
        this.cod = cod;
    }

    public Integer getCod() {
        return cod;
    }

    public void setCod(Integer cod) {
        this.cod = cod;
    }

    public Integer getCodPeriodo() {
        return codPeriodo;
    }

    public void setCodPeriodo(Integer codPeriodo) {
        this.codPeriodo = codPeriodo;
    }

    public String getDestino() {
        return destino;
    }

    public void setDestino(String destino) {
        this.destino = destino;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cod != null ? cod.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DestinosComprobantes)) {
            return false;
        }
        DestinosComprobantes other = (DestinosComprobantes) object;
        if ((this.cod == null && other.cod != null) || (this.cod != null && !this.cod.equals(other.cod))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "co.edu.unitecnologica.modelo.DestinosComprobantes[cod=" + cod + "]";
    }

}
